Skip to content

fix: preserve grounded specs across video shards - #2638

Draft
groupthinking wants to merge 5 commits into
mainfrom
codex/fix-multishard-grounded-spec
Draft

groupthinking wants to merge 5 commits into
mainfrom
codex/fix-multishard-grounded-spec

Conversation

@groupthinking

@groupthinking groupthinking commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Fixes #2639

Multi-shard extraction now retains available grounded specifications and their exact source references, including independent shards that reuse local IDs. This follow-up completes the shared sectional prompt constraints and chooses complete application metadata from a later candidate when the first candidate has empty fields.

Current correction

Head: 2f9649262539638e75104c6c318a69da72dfd326. Tree: a5227c5811fc773c9dfba6b0d180dcf533a8e51b, identical between the local staged merge and GitHub's created tree. This history-preserving integration retains prior head 5d4375e2ef48261b44877a8ab3ea29189ac99373 and current main 512a2558f73d6281b6a880548bedf140b7e30292 as parents. Application source and regression changes are unchanged by this integration; current main's manifests, lockfile and security workflow are retained byte-for-byte.

  • Reuse the single-video strict-field, ID, length, capability enum, citation and honesty constraints in the sectional prompt, retaining the sectional 32-row limit.
  • Select the first candidate with both application name and purpose populated.
  • Detect merged collections over 64 rows and return an explicit blocking aggregate-limit diagnostic with the collection and count. No source-grounded rows are silently truncated.
  • Disable only codex/fix-multishard-grounded-spec through git.deploymentEnabled in root and app Vercel configuration. The first follow-up used an invalid github.enabled object; Vercel rejected it before building with github.enabled should be boolean. Configuration-only commit 5d4375e2ef48261b44877a8ab3ea29189ac99373 corrects that shape to the documented branch map: https://vercel.com/docs/project-configuration/git-configuration. This fixes the configuration error without enabling a preview.

Earlier head 7dcc3642900aed3a700c898220d8010d4dd781dd already added shard-local ID namespaces and reference rewriting, exact-case evidence preservation, raw-to-parsed citation rebasing, and shard-time-bound validation. Their regressions passed again with this correction.

Verification — November 12, 2026 (America/Chicago)

The previous head's Security Scan 43346308028 failed the real high-severity npm-audit gate: 25 high, 22 moderate, zero critical. Its frozen install passed. That failure was caused by the old dependency baseline, including affected Undici, Zod, body-parser, Vite and other packages; it was not the expected missing-preview failure.

The clean integration imports current main's already-reviewed dependency fixes and preserves exactly its full-graph npm audit --audit-level=high policy. No exception, severity downgrade, dev-dependency exclusion, or CI weakening is added. Relative to main, the PR remains eight files with the same 517 additions/30 deletions: the existing source/tests/evidence fixture and two branch deployment guards.

Executed against the exact integrated tree:

  • Node 24.22.1, repository npm 10.8.0: npx --yes npm@10.8.0 ci --ignore-scripts --legacy-peer-deps --no-audit --no-fund completed, exit 0. The reviewed existing Workflow postinstall patch was run explicitly.
  • npm --workspace=apps/web test -- src/lib/__tests__/video-pack-multishard-grounded-spec.test.ts src/lib/__tests__/video-pack-extractor.test.ts src/lib/__tests__/video-pack-extract-merge.test.ts src/lib/__tests__/grounded-spec-pipeline.test.ts src/lib/__tests__/video-pack-consolidator.test.ts src/lib/__tests__/dependency-runtime-compatibility.test.ts src/lib/__tests__/gemini-sdk-continuation.test.ts --maxWorkers=2 --reporter=dot: seven files, 110 tests passed, exit 0.
  • npm --workspace=apps/web run type-check, full web lint, and cached diff whitespace check: exit 0.
  • npx --yes npm@10.8.0 audit --audit-level=high --json: exit 0, zero critical, zero high, 29 moderate. Moderate findings remain; this is not a clean-audit claim.
  • Manifest/lock bytes remained unchanged after frozen install and audit. The four dependency/security files match current main byte-for-byte. Both JSON deployment configurations parse with this exact branch disabled through git.deploymentEnabled.
  • Local staged tree a5227c5811fc773c9dfba6b0d180dcf533a8e51b equals GitHub's tree exactly. Existing branch update used an expected-head lease.
  • Exact-current-head npm-audit job 131630517401 completed successfully, independently confirming the corrected high-severity gate. Current-head Dependency Review run 43347572496 also passed. Other hosted CI/security/build acceptance is still pending. The earlier seven-file 90-case borrowed-dependency run is historical; this new 110-case receipt uses a fresh exact-lock install.
  • One transient executor disconnect interrupted result retrieval; after recovery the suite was repeated and types/lint/audit completed with actual exits above. No passing production build or live extraction is claimed.
  • No production build retry was attempted here; the separate local build approval block remains respected. No live extraction, paid provider call, server-side action or deployment was executed.

Security dependency evidence

  • Advisory: the old audit included Undici GHSA-2m5v-pch6-74hx, Zod GHSA-mrhx-c7xc-m3w5, body-parser GHSA-27r3-jxmh-p828, and Vite GHSA-587h-7wmj-h5pm. This integration reuses main's fixes; no new advisory exception is introduced.
  • Package and versions: dependency files are exactly current main 512a2558f73d6281b6a880548bedf140b7e30292, preserving its direct/transitive classification and floors, including Workflow-owned Undici >=7.30.1, Zod >=4.6.6, body-parser >=2.4.0 and Vite >=8.3.3.
  • Validation: exact-lock frozen install, 110 regressions, web types/lint and full-graph high audit pass as above; 29 moderate findings remain. Fresh hosted acceptance is pending.
  • Rollback: prepare a reviewed revert that preserves unrelated main changes. Restoring the old dependency baseline reintroduces the observed audit failures. Keep this draft unmerged and undeployed until all required gates pass.

Remaining HOLD: aggregate capacity

The review request to keep all 66 requirements usable remains unresolved. The final schema allows at most 64 rows per collection. Three valid 22-row shards therefore produce a blocking diagnostic rather than an available grounded spec. Changing the supported aggregate bound or selecting a bounded partial result requires a separate reviewed decision; this patch preserves the existing bound and fail-closed behavior. The overflow thread remains open.

Seven other review threads are resolved using the implemented corrections and passing regressions. This remains a draft and unmerged, with this branch excluded from automatic deployments in both versioned configurations. No live extraction, paid provider call, server-side action or production acceptance was executed; the regression uses saved source evidence and offline test responses.

Copilot AI max review requested due to automatic review settings November 10, 2026 08:49
@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Error Error Nov 13, 2026 1:35am UTC

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions github-actions Bot added javascript Pull requests that update javascript code tests labels Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Repository reconciliation: this PR does not reference exactly one canonical issue.

Please add a Closes #<issue> reference in the PR description so it can be tracked against the delivery plan.

See governance: #898

@github-actions

Copy link
Copy Markdown
Contributor

✅ E2E Test Results: ALL TESTS PASSED

Metric Value
Status 🟢 GREEN
Total Tests
Passed 16
Failed
Deployment https://v0-uvai-pauz9b4js-garv1.vercel.app
Test Output
very request without persisting it�[32m 1�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mhomepage returns 200 with HTML�[32m 300�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mfeatures page contains template/workflow markup�[33m 312�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mfeatures page surfaces at least 5 workflow/template indicators�[32m 254�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mPOST /api/video/pack accepts a YouTube URL without hanging�[33m 2022�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mGET /api/video/pack resolves to a ready pack with evidence lineage�[33m 861�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mmissing URL returns 400, not a hang�[32m 204�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22minvalid URL returns 400 quickly, not a hang�[32m 225�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mPOST /api/video/pack with no body returns 400�[32m 210�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mDashboard�[2m > �[22m/dashboard returns 200�[33m 417�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mDashboard�[2m > �[22m/dashboard contains agent or pipeline visualization markup�[32m 254�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mGET /api returns a response (not 404)�[33m 342�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mretired /api/pipeline routes are gone (no pipeline served)�[32m 112�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22mhomepage has proper meta tags�[32m 209�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22m/features page returns 200�[32m 248�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m16 passed�[39m�[22m�[90m (16)�[39m
�[2m   Start at �[22m 08:51:04
�[2m   Duration �[22m 8.48s�[2m (transform 51ms, setup 0ms, import 65ms, tests 8.29s, environment 0ms)�[22m


Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved merge defects can silently drop or mislink requirements and invalidate entire grounded specs through ID collisions, schema-limit overflow, and incorrect citation rebasing.

7 open issues
What changed in this PR

Extends UVAI’s Video Pack extraction to carry grounded specifications through multi-shard video processing.

Changes:

  • Requests partial grounded specs with section-local citation indices from shard workers.
  • Combines available candidates and rebases citations against merged transcript and visual evidence.
  • Adds fixture-based regression coverage and updates sectional prompt assertions.
File Description
apps/​web/​src/​test/​real-aujzb1d-fag-evidence.ts Adds captured evidence and a grounded-spec fixture.
apps/​web/​src/​lib/​video-pack-extractor.ts Requests partial grounded specs from sectional workers.
apps/​web/​src/​lib/​video-pack-extract-merge.ts Merges grounded candidates and rebases citation indices.
apps/​web/​src/​lib/​__tests__/​video-pack-multishard-grounded-spec.test.ts Exercises multi-shard extraction through final pack binding.
apps/​web/​src/​lib/​__tests__/​video-pack-extractor.test.ts Updates expectations for the sectional extraction prompt.

Review effort: Max

Comment on lines +184 to +185
requirements: dedupeBy(rebased.flatMap((candidate) => candidate.requirements), (requirement) => requirement.id || requirement.title),
acceptanceCriteria: dedupeBy(rebased.flatMap((candidate) => candidate.acceptanceCriteria), (criterion) => criterion.id),
@github-actions

Copy link
Copy Markdown
Contributor

✅ E2E Test Results: ALL TESTS PASSED

Metric Value
Status 🟢 GREEN
Total Tests
Passed 16
Failed
Deployment https://v0-uvai-iitt37l6k-garv1.vercel.app
Test Output
every request without persisting it�[32m 1�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mhomepage returns 200 with HTML�[32m 132�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mfeatures page contains template/workflow markup�[32m 262�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mTemplate Gallery�[2m > �[22mfeatures page surfaces at least 5 workflow/template indicators�[32m 180�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mPOST /api/video/pack accepts a YouTube URL without hanging�[33m 1987�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mVideo Pack Pipeline�[2m > �[22mGET /api/video/pack resolves to a ready pack with evidence lineage�[33m 668�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mmissing URL returns 400, not a hang�[32m 137�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22minvalid URL returns 400 quickly, not a hang�[33m 370�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mError Handling�[2m > �[22mPOST /api/video/pack with no body returns 400�[32m 118�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mDashboard�[2m > �[22m/dashboard returns 200�[32m 221�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mDashboard�[2m > �[22m/dashboard contains agent or pipeline visualization markup�[32m 151�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mGET /api returns a response (not 404)�[32m 255�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mAPI Health�[2m > �[22mretired /api/pipeline routes are gone (no pipeline served)�[32m 81�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22mhomepage has proper meta tags�[32m 135�[2mms�[22m�[39m
 �[32m✓�[39m tests/e2e/pipeline.test.ts�[2m > �[22mEventRelay E2E — Live Deployment�[2m > �[22mStatic Assets�[2m > �[22m/features page returns 200�[32m 156�[2mms�[22m�[39m

�[2m Test Files �[22m �[1m�[32m1 passed�[39m�[22m�[90m (1)�[39m
�[2m      Tests �[22m �[1m�[32m16 passed�[39m�[22m�[90m (16)�[39m
�[2m   Start at �[22m 09:31:54
�[2m   Duration �[22m 6.52s�[2m (transform 45ms, setup 0ms, import 55ms, tests 6.37s, environment 0ms)�[22m


@vercel

vercel Bot commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Deployment failed for project v0-uvai with the following error:

The `vercel.json` schema validation failed with the following message: `github.enabled` should be boolean

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ Large PR detected (547 lines changed)

This branch had an error being deployed

1 failed (outdated) deployment
Preview — 200b26dd Deployed Nov 13, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-shard video extraction drops grounded_spec

3 participants